
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
is-any-array
Advanced tools
The is-any-array npm package is a utility that helps determine if a given value is an array. It is particularly useful in scenarios where you need to validate input types or ensure that certain operations are performed on arrays.
Basic Array Check
This feature allows you to check if a given value is an array. It returns true if the value is an array and false otherwise.
const isAnyArray = require('is-any-array');
console.log(isAnyArray([1, 2, 3])); // true
console.log(isAnyArray('not an array')); // false
Array-like Objects Check
This feature extends the basic array check to include array-like objects such as typed arrays. It helps in identifying more complex array structures.
const isAnyArray = require('is-any-array');
console.log(isAnyArray({ length: 0 })); // false
console.log(isAnyArray(new Int8Array(2))); // true
The is-array package provides a simple utility to check if a value is an array. It is similar to is-any-array but does not support array-like objects such as typed arrays.
The lodash.isarray package is a part of the Lodash library that specifically checks if a value is an array. It offers similar functionality to is-any-array but is part of a larger utility library.
The arrayify package converts a value to an array if it is not already one. While it doesn't directly check if a value is an array, it ensures that the value can be safely used as an array, providing a different approach to handling array-like values.
Check if toString.call ends with Array
$ npm install is-any-array
const isAnyArray = require('is-any-array');
isAnyArray(1); // false
isAnyArray('ab'); // false
isAnyArray({ a: 1 }); // false
isAnyArray([1, 2, 3]); // true
isAnyArray(new Uint16Array(2))) // true;
FAQs
Check if a value is any kind of array
The npm package is-any-array receives a total of 443,226 weekly downloads. As such, is-any-array popularity was classified as popular.
We found that is-any-array demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.